home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / System 7.0 Samples / ProcDoggie 1.0a6 / ProcDoggie.make < prev    next >
Encoding:
Text File  |  1991-02-07  |  7.5 KB  |  208 lines  |  [TEXT/MPS ]

  1. #------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    Program:    ProcDoggie
  6. #    File:        ProcDoggie.make    - Make Source
  7. #
  8. #    Copyright © 1988-1991 Apple Computer, Inc.
  9. #    All rights reserved.
  10. #
  11. #------------------------------------------------------------------------------
  12.  
  13. AppName            =    ProcDoggie
  14. Signature        =    'MOPD'
  15.  
  16. #------------------------------------------------------------------------------
  17. # Options for our compilers:
  18. #    -sym on: tells the compilers and linker to emit symbol information for
  19. #        a source level debugger, such as SADE.
  20. #    -mbg off: tells the compilers to not emit low-level debugger names. This
  21. #        saves on file space, but you may wish to remove this option if you
  22. #        need to debug with something like Macsbug.
  23. #    -rd: for Rez means to suppress warnings for redeclared types (we redeclare
  24. #        'RECT' because it’s not included in MPW 3.0).
  25. #    -append: means to add the resources to the target file, rather than
  26. #        deleting all the ones that are there first.
  27. #    -d Signature...: is a way of passing our application's signature to Rez.
  28. #        With this mechanism, we can define our signature here, and export
  29. #        it to Rez, so that we don't have to declare it there, too.
  30. #    -sn PASLIB=Main: puts all the routines that would normally go into the
  31. #        PASLIB segment into the Main segment. This is done so that when we
  32. #        call upon any low-level utilities, we don't potentially move memory
  33. #        by loading in a segment.
  34. #------------------------------------------------------------------------------
  35.  
  36. SymOptions        =    #-sym on                    # turn this on to debug with SADE
  37.  
  38. POptions        =    {SymOptions} -mbg full
  39. RezOptions        =    -rd -append -d Signature="{Signature}" -d AppName='"ProcDoggie"'
  40. LinkOptions        =    {SymOptions} {SegmentMappings} -msg nodup
  41. SegmentMappings    =    -sn INTENV=Main ∂
  42.                     -sn PASLIB=Main ∂
  43.                     -sn STDCLIB=Main ∂
  44.                     -sn SANELIB=Main ∂
  45.                     -sn MAFailureRes=Main ∂
  46.                     -sn Offscreen=Main ∂
  47.  
  48. #------------------------------------------------------------------------------
  49. # These are modified default build rules.  This is necessary to take into
  50. # account differences between MPW 3.1 and 3.2
  51. #------------------------------------------------------------------------------
  52. .p.o            ƒ    .p
  53.     {Pascal} {POptions} {PAltOptions} {DepDir}{Default}.p -o {TargDir}{Default}.p.o
  54.  
  55. .c.o            ƒ    .c
  56.     {C} {COptions} {CAltOptions} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
  57.  
  58. #------------------------------------------------------------------------------
  59. # These are the objects that we want to link with. If any one of these
  60. # changes, then we invoke the Link command.
  61. #------------------------------------------------------------------------------
  62.  
  63. AppObjects            =    ∂
  64.                         ProcDoggie.p.o ∂
  65.                         UDialogUtils.p.o ∂
  66.                         UEmergMem.p.o ∂
  67.                         UMenuHandler.p.o ∂
  68.                         UProcessGuts.p.o ∂
  69.                         UProcessUtils.p.o ∂
  70.                         UGlobals.p.o
  71.  
  72. ProcessLDEFObjects    =    ∂
  73.                         UProcessLDEF.p.o
  74.  
  75.  
  76. #------------------------------------------------------------------------------
  77. # Which files we link with depends on whether we are running MPW 3.1 or 3.2
  78. # Under MPW 3.2 and later, “CInterface.o” and “CRuntime.o” are merged with 
  79. # “Interface.o” and “Runtime.o”. The appropriate choice will be made 
  80. # dynamically before compiling and linking occurs.  See ShellForce below.
  81. #
  82. # Be sure GestaltGlue.a.o is before Interface.o in PLibs and CLibs below.
  83. #------------------------------------------------------------------------------
  84. PLibs            =    ∂
  85.                     "{Libraries}Runtime.o" ∂
  86.                     "{Libraries}Interface.o" ∂
  87.                     "{PLibraries}PasLib.o"
  88.  
  89. PLibs32            =    ∂
  90.                     "{Libraries}Runtime.o" ∂
  91.                     "{Libraries}Interface.o" ∂
  92.                     "{PLibraries}PasLib.o"
  93.  
  94. CLibs            =    ∂
  95.                     "{CLibraries}CRuntime.o" ∂
  96.                     "{CLibraries}CInterface.o" ∂
  97.                     "{Libraries}Interface.o"
  98.  
  99. CLibs32            =    ∂
  100.                     "{CLibraries}StdCLib.o" ∂
  101.                     "{Libraries}Runtime.o" ∂
  102.                     "{Libraries}Interface.o"
  103.  
  104. #------------------------------------------------------------------------------
  105. # Dependencies for the individual components. These will invoke the
  106. # default build rules as described in Chapter 9 of the MPW 3.0 manual.
  107. #------------------------------------------------------------------------------
  108.  
  109. {AppObjects}            ƒ    {AppName}.make
  110.  
  111. ProcDoggie.p.o            ƒ    ProcDoggie.p ∂
  112.                             UGlobals.p ∂
  113.                             UEmergMem.p ∂
  114.                             UMenuHandler.p ∂
  115.                             UProcessGuts.p ∂
  116.                             UProcessUtils.p
  117.  
  118. UGlobals.p.o            ƒ    UGlobals.p UGlobals.inc1.p ∂
  119.                             UEmergMem.p
  120.  
  121. UDialogUtils.p.o        ƒ    UDialogUtils.p UDialogUtils.inc1.p ∂
  122.                             UEmergMem.p
  123.  
  124. UEmergMem.p.o            ƒ    UEmergMem.p UEmergMem.inc1.p
  125.  
  126. UMenuHandler.p.o        ƒ    UMenuHandler.p UMenuHandler.inc1.p ∂
  127.                             UGlobals.p ∂
  128.                             UProcessGuts.p ∂
  129.                             UProcessUtils.p
  130.  
  131. UProcessGuts.p.o        ƒ    UProcessGuts.p UProcessGuts.inc1.p ∂
  132.                             UGlobals.p ∂
  133.                             UDialogUtils.p ∂
  134.                             UEmergMem.p ∂
  135.                             UMenuHandler.p ∂
  136.                             UProcessLDEF.p ∂
  137.                             UProcessUtils.p
  138.  
  139. UProcessUtils.p.o        ƒ    UProcessUtils.p UProcessUtils.inc1.p
  140.  
  141. UWindowHandler.p.o        ƒ    UWindowHandler.p UWindowHandler.inc1.p ∂
  142.                             UGlobals.p ∂
  143.                             UEmergMem.p ∂
  144.                             UProcessGuts.p ∂
  145.                             UProcessUtils.p
  146.  
  147. {ProcessLDEFObjects}    ƒ    {AppName}.make
  148.  
  149. UProcessLDEF.p.o        ƒ    UProcessLDEF.p UProcessLDEF.inc1.p
  150.  
  151. #------------------------------------------------------------------------------
  152. # This is a dummy dependency rule.  This will always be executed.  This dummy
  153. # rule must be the first for {AppName} so that it will be executed first.
  154. # This is necessary to make evaluations that are beyond the scope of
  155. # Make.  These evaluations will be performed by the Shell at execution time,
  156. # and they must execute first because compile and link command lines depend
  157. # on variables set up by these evaluations.  This has the unfortunate side
  158. # effect that Make will always consider {AppName} to be out of date.  It will
  159. # always, at a minimum, execute the commands for the target ShellForce.
  160. #------------------------------------------------------------------------------
  161.  
  162. {AppName}            ƒƒ ShellForce
  163.  
  164. # With the above rule, {AppName} will always be out of date with respect to
  165. # the non-existent file ShellForce.  This will force the following commands to
  166. # be executed.
  167. ShellForce            ƒ
  168.     BEGIN
  169.         IF "{ShellVersion}" == ""
  170.             ( EVALUATE "`Version`" =~ /MPW Shell≈ ([0-9]+(.[ab0-9]+)+)®1≈/ ) ∑ Dev:Null
  171.             SET ShellVersion "{®1}"
  172.         END
  173.         IF "{ShellVersion}" =~ /3.[01]≈/
  174.             SET PAltOptions "-d MPW32=FALSE"
  175.             SET CAltOptions "-d MPW31"
  176.             SET PSysObjects "`QUOTE {PLibs}`"
  177.             SET CSysObjects "`QUOTE {CLibs}`"
  178.         ELSE
  179.             SET PAltOptions "-d MPW32=TRUE"
  180.             SET CAltOptions "-d MPW32"
  181.             SET PSysObjects "`QUOTE {PLibs32}`"
  182.             SET CSysObjects "`QUOTE {CLibs32}`"
  183.         END
  184.     END ∑ Dev:Null # Output to bit bucket so we don’t see above calculations
  185.  
  186. #------------------------------------------------------------------------------
  187. # Build rule that links our application together. If any of our objects 
  188. # changes, or this makefile changes, then we relink.  The dummy prerequisite
  189. # ShellForce must come before any other prerequisites for {AppName}
  190. #------------------------------------------------------------------------------
  191.  
  192. {AppName}        ƒƒ    {AppObjects}
  193.     Link {LinkOptions} -o {Targ} {AppObjects} {PSysObjects}
  194.     SetFile {Targ} -t APPL -c {Signature} -a BM
  195.  
  196. {AppName}        ƒƒ    {ProcessLDEFObjects}
  197.     Link  -m PROCESSLIST -rn -rt LDEF=128 -o {Targ} {ProcessLDEFObjects}
  198.     SetFile {Targ} -t APPL -c {Signature} -a BM
  199.  
  200. #------------------------------------------------------------------------------
  201. # Build rule that creates our resources and adds them to the application
  202. #------------------------------------------------------------------------------
  203.  
  204. {AppName}        ƒƒ    {AppName}.make ∂
  205.                     {AppName}.r ∂
  206.                     {AppName}.rsrc
  207.     Rez {RezOptions} {AppName}.r -o {Targ}
  208.